package com.xujianlun.cpms.common;

public enum ResponseCode implements BaseCodeEnum {
    
    //***********自定义异常*********************
    SUCCESS(200,"操作成功"),
    ERROR_CODE404(404,"找不到页面"),
    ERROR_CODE500(500,"系统错误"),
    ERROR_CODE600(600,"其他业务异常错误"),
    ERROR_CODE400(400,"参数错误"),
    USER_USERNAME_PASSWORD(10001,"用户名或者密码错误"),
    USER_EXIST(10002,"用户已经存在!"),
    USER_NO_EXIST(10005,"用户不存在"),
    TOKEN_ERROR(401,"token验证失败!请重新登录系统"),
    TOKEN_NO_EXIST(401,"token不存在，请重新登录系统");

    //***********自定义异常结束*********************

    private int code;
    private String msg;

    ResponseCode(int code,String msg){
        this.code=code;
        this.msg=msg;
    }

    @Override
    public int getCode(){
        return code;
    }

    @Override
    public String getMessage(){
        return msg;
    }
}
